#-*- coding:utf-8 -*-

n = int(input())  # 获取输入

# while
print('==== while ====')
x = 3
a1 = 1
a2 = 1
print(a1)
print(a2)
while x <= n:  # x>n时循环结束
    a3 = a1 + a2
    print(a3)
    a1 = a2
    a2 = a3
    x += 1  # x用来计数，每次+1


# for
print('==== for ====')
a1 = 1
a2 = 1
print(a1)
print(a2)
for x in range(3, n+1):  # x从3到n
    a3 = a1 + a2
    print(a3)
    a1 = a2
    a2 = a3


# 递归，占用内容大，效率低，无法计算大数值
print('==== 递归 ====')
def fab(n):  # 递归函数，计算第n项的值
    if n == 1 or n == 2:
        return 1
    return fab(n-1) + fab(n-2)

result = []
for x in range(1, n+1):
    result.append(str(fab(x)))
print('\n'.join(result))  # 输出结果
